From 6385ef633c5f07ec904d33fb4dcdef5f00101726 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Mon, 13 Nov 2017 00:44:20 -0600 Subject: [PATCH] A bunch of busywork to satisfy hyperactive warnings from newer compilers. Part 1. Explictly initialize every member of a struct, Don't use C-style functions that take no args, don't name method arguments that aren't used, etc. --- alan.cc | 20 ++++++------ an1.cc | 2 ++ arcdist.cc | 22 ++++++------- bcr.cc | 80 ++++++++++++++++++++++++---------------------- bend.cc | 12 +++---- brauniger_iq.cc | 2 ++ compegps.cc | 2 ++ cst.cc | 2 ++ delgpl.cc | 2 ++ destinator.cc | 9 ++++-- dg-100.cc | 8 +++-- discard.cc | 20 ++++++------ dmtlog.cc | 14 ++++---- duplicate.cc | 8 ++--- easygps.cc | 2 ++ exif.cc | 8 ++--- filter_skeleton.cc | 6 ++-- format_skeleton.cc | 13 +++++--- 18 files changed, 129 insertions(+), 103 deletions(-) diff --git a/alan.cc b/alan.cc index 046e93259..8bda749c6 100644 --- a/alan.cc +++ b/alan.cc @@ -195,7 +195,7 @@ static arglist_t trl_args[] = { /**************************************************************************/ // FIXME: Why is this code doing its own byte order conversion? -static unsigned int byte_order(void) +static unsigned int byte_order() { unsigned long test = BYTEORDER_TEST; unsigned char* ptr; @@ -527,7 +527,7 @@ static Waypoint* get_wpt(struct wprdata* wprdata, unsigned n) return WP; } -static void wpr_read(void) +static void wpr_read() { struct wprdata wprdata; struct rtehdr* rtehdr; @@ -589,7 +589,7 @@ static void wpr_read(void) } } -static void trl_read(void) +static void trl_read() { struct trldata trldata; struct trkhdr* trkhdr; @@ -785,12 +785,12 @@ static void wpr_route_wpt(const Waypoint* WP) rte->wptnum ++; } -static void wpr_route_trl(const route_head* RT) +static void wpr_route_trl(const route_head*) { /* should we do some final sanity checks? */ } -static void wpr_write(void) +static void wpr_write() { int i; @@ -886,7 +886,7 @@ static void trl_track_wpt(const Waypoint* WP) trkhdr->next = trkhdr->totalpt; } -static void trl_track_tlr(const route_head* TL) +static void trl_track_tlr(const route_head*) { struct trkhdr* trkhdr; int trk_idx; @@ -901,7 +901,7 @@ static void trl_track_tlr(const route_head* TL) TRL.loghdr.num = -1; } -static void trl_write(void) +static void trl_write() { struct trkhdr* trkhdr; void* buf; @@ -964,7 +964,7 @@ static void alan_rd_init(const QString& fname) fin = gbfopen(fname, "rb", MYNAME); } -static void alan_rd_deinit(void) +static void alan_rd_deinit() { gbfclose(fin); fin = NULL; @@ -976,14 +976,14 @@ static void alan_wr_init(const QString& fname) fout = gbfopen(fname, "wb", MYNAME); } -static void alan_wr_deinit(void) +static void alan_wr_deinit() { gbfclose(fout); fout = NULL; } -static void alan_exit(void) +static void alan_exit() { return; } diff --git a/an1.cc b/an1.cc index 2d4893b96..e4ee15b58 100644 --- a/an1.cc +++ b/an1.cc @@ -1262,4 +1262,6 @@ ff_vecs_t an1_vecs = { NULL, an1_args, CET_CHARSET_ASCII, 0 /* CET-REVIEW */ + , NULL_POS_OPS, + nullptr }; diff --git a/arcdist.cc b/arcdist.cc index 81885cb72..a15c8a881 100644 --- a/arcdist.cc +++ b/arcdist.cc @@ -51,31 +51,31 @@ static arglist_t arcdist_args[] = { { "file", &arcfileopt, "File containing vertices of arc", - NULL, ARGTYPE_FILE, ARG_NOMINMAX + NULL, ARGTYPE_FILE, ARG_NOMINMAX, nullptr }, { "rte", &rteopt, "Route(s) are vertices of arc", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "trk", &trkopt, "Track(s) are vertices of arc", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "distance", &distopt, "Maximum distance from arc", - NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX + NULL, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr }, { "exclude", &exclopt, "Exclude points close to the arc", NULL, - ARGTYPE_BOOL, ARG_NOMINMAX + ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "points", &ptsopt, "Use distance from vertices not lines", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "project", &projectopt, "Move waypoints to its projection on lines or vertices", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; @@ -147,14 +147,14 @@ arcdist_arc_disp_wpt_cb(const Waypoint* arcpt2) } static void -arcdist_arc_disp_hdr_cb(const route_head* rte) +arcdist_arc_disp_hdr_cb(const route_head*) { /* Set arcpt1 to NULL */ arcdist_arc_disp_wpt_cb(NULL); } void -arcdist_process(void) +arcdist_process() { queue* elem, * tmp; unsigned removed; @@ -268,7 +268,7 @@ arcdist_process(void) } void -arcdist_init(const char* args) +arcdist_init(const char*) { char* fm; @@ -291,7 +291,7 @@ arcdist_init(const char* args) } void -arcdist_deinit(void) +arcdist_deinit() { /* do nothing */ } diff --git a/bcr.cc b/bcr.cc index c4644a19c..7170bbde2 100644 --- a/bcr.cc +++ b/bcr.cc @@ -65,19 +65,19 @@ static arglist_t bcr_args[] = { { "index", &rtenum_opt, "Index of route to write (if more than one in source)", - NULL, ARGTYPE_INT, "1", NULL + NULL, ARGTYPE_INT, "1", NULL, nullptr }, { "name", &rtename_opt, "New name for the route", - NULL, ARGTYPE_STRING, ARG_NOMINMAX + NULL, ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, { "radius", &radius_opt, "Radius of our big earth (default 6371000 meters)", "6371000", - ARGTYPE_FLOAT, ARG_NOMINMAX + ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr }, { "prefer_shortnames", &prefer_shortnames_opt, "Use shortname instead of description", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; @@ -86,41 +86,41 @@ typedef struct { const char* bcr_name; const char* mps_name; const char* symbol_DE; - int warned; + bool warned; } bcr_icon_mapping_t; static bcr_icon_mapping_t bcr_icon_mapping[] = { - { BCR_DEF_ICON, BCR_DEF_MPS_ICON, BCR_DEF_ICON }, - { "", BCR_DEF_MPS_ICON, "Eigene Adressen" }, - { "AdrMon alpen", "Summit", "Pass-Strassen" }, - { "AdrMon bauern", NULL, "Bauern- und Biohoefe" }, - { "AdrMon cmpngs", "Campground", "Campingplaetzte" }, - { "AdrMon p_aeu", "Scenic Area", "Sehenswertes" }, - { "AdrMon p_beu", "Gas Station", "Tanken" }, - { "AdrMon p_deu", "Parking Area", "Parken" }, - { "AdrMon p_feu", "Restaurant", "Gastro" }, - { "AdrMon p_geu", "Museum", "Freizeit" }, - { "AdrMon p_heu", "Gas Station", "Tankstellen" }, - { "AdrMon p_keu", NULL, "Faehrverbindungen" }, - { "AdrMon p_leu", NULL, "Grenzuebergaenge" }, - { "AdrMon p_teu", NULL, "Wein- und Sektgueter" }, - { "AdrMon RUINEN", "Ghost Town", "Burgen und Schloesser" }, - { "AdrMon NFHAUS", "Residence", "Naturfreundehaeuser" }, - { "AdrMon racing", "Bike Trail", "Rennstrecken" }, - { "AdrMon TNKRST", "Bar", "Tankraststaetten" }, - { "AdrMon tpclub", "Contact, Biker", "Motorrad-Clubs" }, - { "AdrMon tpequ", NULL, "Motorrad-Equipment" }, - { "AdrMon tphot", "Hotel", "Motorrad-Hotels" }, - { "AdrMon tpmh", NULL, "Motorradhaendler" }, - { "AdrMon tpss", "Restricted Area", "Sperrungen" }, - { "AdrMon tpsw", "Scenic Area", "Sehenswertes" }, - { "AdrMon tptref", NULL, "Treffpunkte" }, - { "AdrMon VORTE", "Information", "Ortsinformationen" }, - { "AdrMon WEBCAM", NULL, "WebCam-Standorte" }, - { "AdrMon youthh", NULL, "Jugendherbergen" }, - { "Town", "City (Small)", "Orte" }, - { NULL, NULL, NULL, 0 } + { BCR_DEF_ICON, BCR_DEF_MPS_ICON, BCR_DEF_ICON, false }, + { "", BCR_DEF_MPS_ICON, "Eigene Adressen", false }, + { "AdrMon alpen", "Summit", "Pass-Strassen", false }, + { "AdrMon bauern", NULL, "Bauern- und Biohoefe", false }, + { "AdrMon cmpngs", "Campground", "Campingplaetzte", false }, + { "AdrMon p_aeu", "Scenic Area", "Sehenswertes", false }, + { "AdrMon p_beu", "Gas Station", "Tanken", false }, + { "AdrMon p_deu", "Parking Area", "Parken", false }, + { "AdrMon p_feu", "Restaurant", "Gastro", false }, + { "AdrMon p_geu", "Museum", "Freizeit", false }, + { "AdrMon p_heu", "Gas Station", "Tankstellen", false }, + { "AdrMon p_keu", NULL, "Faehrverbindungen", false }, + { "AdrMon p_leu", NULL, "Grenzuebergaenge", false }, + { "AdrMon p_teu", NULL, "Wein- und Sektgueter", false }, + { "AdrMon RUINEN", "Ghost Town", "Burgen und Schloesser", false }, + { "AdrMon NFHAUS", "Residence", "Naturfreundehaeuser", false }, + { "AdrMon racing", "Bike Trail", "Rennstrecken", false }, + { "AdrMon TNKRST", "Bar", "Tankraststaetten", false }, + { "AdrMon tpclub", "Contact, Biker", "Motorrad-Clubs", false }, + { "AdrMon tpequ", NULL, "Motorrad-Equipment", false }, + { "AdrMon tphot", "Hotel", "Motorrad-Hotels", false }, + { "AdrMon tpmh", NULL, "Motorradhaendler", false }, + { "AdrMon tpss", "Restricted Area", "Sperrungen", false }, + { "AdrMon tpsw", "Scenic Area", "Sehenswertes", false }, + { "AdrMon tptref", NULL, "Treffpunkte", false }, + { "AdrMon VORTE", "Information", "Ortsinformationen", false }, + { "AdrMon WEBCAM", NULL, "WebCam-Standorte", false }, + { "AdrMon youthh", NULL, "Jugendherbergen", false }, + { "Town", "City (Small)", "Orte", false }, + { NULL, NULL, NULL, false } }; static void @@ -136,7 +136,7 @@ bcr_handle_icon_str(const char* str, Waypoint* wpt) if (m->symbol_DE == NULL) { if (! m->warned) { - m->warned = 1; + m->warned = true; warning(MYNAME ": Unknown icon \"%s\" found. Please report.\n", str); } return; @@ -347,12 +347,12 @@ bcr_wr_deinit(void) } static void -bcr_route_trailer(const route_head* rte) +bcr_route_trailer(const route_head*) { } static void -bcr_write_wpt(const Waypoint* wpt) +bcr_write_wpt(const Waypoint*) { } @@ -519,5 +519,7 @@ ff_vecs_t bcr_vecs = { bcr_data_write, NULL, bcr_args, - CET_CHARSET_MS_ANSI, 0 /* CET-REVIEW */ + CET_CHARSET_MS_ANSI, 0, /* CET-REVIEW */ + NULL_POS_OPS, + nullptr }; diff --git a/bend.cc b/bend.cc index 89c9d801e..48993ecce 100644 --- a/bend.cc +++ b/bend.cc @@ -44,17 +44,17 @@ static arglist_t bend_args[] = { { "distance", &distopt, "Distance to the bend in meters where the new points will be added", - "25", ARGTYPE_FLOAT, ARG_NOMINMAX + "25", ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr }, { "minangle", &minangleopt, "Minimum bend angle in degrees", "5", - ARGTYPE_FLOAT, ARG_NOMINMAX + ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; static void -bend_init(const char* args) +bend_init(const char*) { maxDist = 0.0; if (distopt) { @@ -186,7 +186,7 @@ process_route_orig(const route_head* route_orig) } static void -bend_process(void) +bend_process() { queue* elem, *tmp; QUEUE_FOR_EACH(routes_orig, elem, tmp) { @@ -196,14 +196,14 @@ bend_process(void) } static void -bend_deinit(void) +bend_deinit() { route_flush(routes_orig); xfree(routes_orig); } static void -bend_exit(void) +bend_exit() { } diff --git a/brauniger_iq.cc b/brauniger_iq.cc index e31448a1a..aee6a6304 100644 --- a/brauniger_iq.cc +++ b/brauniger_iq.cc @@ -276,4 +276,6 @@ ff_vecs_t brauniger_iq_vecs = { NULL, brauniger_iq_args, CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */ + , NULL_POS_OPS, + nullptr }; diff --git a/compegps.cc b/compegps.cc index 121bc8e0e..40405f1e9 100644 --- a/compegps.cc +++ b/compegps.cc @@ -705,5 +705,7 @@ ff_vecs_t compegps_vecs = { NULL, compegps_args, CET_CHARSET_MS_ANSI, 1 + , NULL_POS_OPS, + nullptr }; #endif /* CSVFMTS_ENABLED */ diff --git a/cst.cc b/cst.cc index cfb4373aa..03d9e8d44 100644 --- a/cst.cc +++ b/cst.cc @@ -334,4 +334,6 @@ ff_vecs_t cst_vecs = { NULL, cst_args, CET_CHARSET_MS_ANSI, 0 /* CET-REVIEW */ + , NULL_POS_OPS, + nullptr }; diff --git a/delgpl.cc b/delgpl.cc index 4607691e1..6d810f252 100644 --- a/delgpl.cc +++ b/delgpl.cc @@ -174,4 +174,6 @@ ff_vecs_t gpl_vecs = { NULL, NULL, CET_CHARSET_UTF8, 1 /* there is no need to convert anything | CET-REVIEW */ + , NULL_POS_OPS, + nullptr }; diff --git a/destinator.cc b/destinator.cc index 07c6b2f56..927a1f558 100644 --- a/destinator.cc +++ b/destinator.cc @@ -561,7 +561,8 @@ ff_vecs_t destinator_poi_vecs = { NULL, destinator_args, CET_CHARSET_UTF8, 1 /* fixed */ -}; + , NULL_POS_OPS, + nullptr}; ff_vecs_t destinator_itn_vecs = { ff_type_file, @@ -579,7 +580,8 @@ ff_vecs_t destinator_itn_vecs = { NULL, destinator_args, CET_CHARSET_UTF8, 1 /* fixed */ -}; + , NULL_POS_OPS, + nullptr}; ff_vecs_t destinator_trl_vecs = { ff_type_file, @@ -597,6 +599,7 @@ ff_vecs_t destinator_trl_vecs = { NULL, destinator_args, CET_CHARSET_UTF8, 1 /* fixed */ -}; + , NULL_POS_OPS, + nullptr }; /**************************************************************************/ diff --git a/dg-100.cc b/dg-100.cc index 238ffaf4e..a4e321f48 100644 --- a/dg-100.cc +++ b/dg-100.cc @@ -696,11 +696,11 @@ static arglist_t dg100_args[] = { { "erase", &erase, "Erase device data after download", - "0", ARGTYPE_BOOL, ARG_NOMINMAX + "0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "erase_only", &erase_only, "Only erase device data, do not download anything", - "0", ARGTYPE_BOOL, ARG_NOMINMAX + "0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; @@ -780,6 +780,8 @@ ff_vecs_t dg100_vecs = { dg100_args, CET_CHARSET_ASCII, 0 /* ascii is the expected character set */ /* not fixed, can be changed through command line parameter */ + , NULL_POS_OPS, + nullptr }; ff_vecs_t dg200_vecs = { @@ -799,5 +801,7 @@ ff_vecs_t dg200_vecs = { dg100_args, CET_CHARSET_ASCII, 0 /* ascii is the expected character set */ /* not fixed, can be changed through command line parameter */ + , NULL_POS_OPS, + nullptr }; /**************************************************************************/ diff --git a/discard.cc b/discard.cc index 67ab920f5..479185070 100644 --- a/discard.cc +++ b/discard.cc @@ -57,35 +57,35 @@ static arglist_t fix_args[] = { { "hdop", &hdopopt, "Suppress points with higher hdop", - "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX + "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr }, { "vdop", &vdopopt, "Suppress points with higher vdop", - "-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX + "-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr }, { "hdopandvdop", &andopt, "Link hdop and vdop supression with AND", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "sat", &satopt, "Minimium sats to keep points", - "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX + "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX, nullptr }, { "fixnone", &fixnoneopt, "Suppress points without fix", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "fixunknown", &fixunknownopt, "Suppress points with unknown fix", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "elemin", &eleminopt, "Suppress points below given elevation in meters", - NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX + NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX, nullptr }, { "elemax", &elemaxopt, "Suppress points above given elevation in meters", - NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX + NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX, nullptr }, { "matchname", &nameopt, @@ -193,7 +193,7 @@ fix_process_head(const route_head* trk) } static void -fix_process(void) +fix_process() { // Filter waypoints. what = wptdata; @@ -210,7 +210,7 @@ fix_process(void) } static void -fix_init(const char* args) +fix_init(const char*) { if (hdopopt) { hdopf = atof(hdopopt); diff --git a/dmtlog.cc b/dmtlog.cc index f535a5a11..5725cef94 100644 --- a/dmtlog.cc +++ b/dmtlog.cc @@ -152,7 +152,7 @@ tlog3a_xgcb_version(xg_string args, const QXmlStreamAttributes*) } static void -tlog3a_xgcb_length(xg_string args, const QXmlStreamAttributes*) +tlog3a_xgcb_length(xg_string, const QXmlStreamAttributes*) { } @@ -235,7 +235,7 @@ tlog3b_xgcb_tfdes(xg_string args, const QXmlStreamAttributes*) static void -tlog3b_xgcb_wptst(xg_string args, const QXmlStreamAttributes*) +tlog3b_xgcb_wptst(xg_string, const QXmlStreamAttributes*) { xmlwpt = new Waypoint; xmldatum = DATUM_WGS84; @@ -243,7 +243,7 @@ tlog3b_xgcb_wptst(xg_string args, const QXmlStreamAttributes*) static void -tlog3b_xgcb_tptst(xg_string args, const QXmlStreamAttributes*) +tlog3b_xgcb_tptst(xg_string, const QXmlStreamAttributes*) { xmlwpt = new Waypoint; xmldatum = DATUM_WGS84; @@ -251,7 +251,7 @@ tlog3b_xgcb_tptst(xg_string args, const QXmlStreamAttributes*) static void -tlog3b_xgcb_tpten(xg_string args, const QXmlStreamAttributes*) +tlog3b_xgcb_tpten(xg_string, const QXmlStreamAttributes*) { finalize_pt(xmlwpt); @@ -322,7 +322,7 @@ tlog3b_xgcb_tptdt(xg_string args, const QXmlStreamAttributes*) static void -tlog3b_xgcb_wpten(xg_string args, const QXmlStreamAttributes*) +tlog3b_xgcb_wpten(xg_string, const QXmlStreamAttributes*) { finalize_pt(xmlwpt); waypt_add(xmlwpt); @@ -777,7 +777,7 @@ track_hdr_cb(const route_head* trk) } static void -track_tlr_cb(const route_head* trk) +track_tlr_cb(const route_head*) { } @@ -859,6 +859,8 @@ ff_vecs_t dmtlog_vecs = { NULL, dmtlog_args, CET_CHARSET_ASCII, 0 + , NULL_POS_OPS, + nullptr }; diff --git a/duplicate.cc b/duplicate.cc index 780b51e37..0e1578ba9 100644 --- a/duplicate.cc +++ b/duplicate.cc @@ -33,19 +33,19 @@ static arglist_t dup_args[] = { { "shortname", &snopt, "Suppress duplicate waypoints based on name", - NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "location", &lcopt, "Suppress duplicate waypoint based on coords", - NULL, ARGTYPE_END_REQ | ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_END_REQ | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "all", &purge_duplicates, "Suppress all instances of duplicates", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, { "correct", &correct_coords, "Use coords from duplicate points", - NULL, ARGTYPE_BOOL, ARG_NOMINMAX + NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; diff --git a/easygps.cc b/easygps.cc index 6b641024d..d38370f11 100644 --- a/easygps.cc +++ b/easygps.cc @@ -224,4 +224,6 @@ ff_vecs_t easygps_vecs = { NULL, easygps_args, CET_CHARSET_ASCII, 0 /* CET REVIEW */ + , NULL_POS_OPS, + nullptr }; diff --git a/exif.cc b/exif.cc index b6d73ca61..a678c6d5d 100644 --- a/exif.cc +++ b/exif.cc @@ -143,10 +143,10 @@ static char* opt_filename, *opt_overwrite, *opt_frame, *opt_name; static uint8_t writer_gps_tag_version[4] = {2, 0, 0, 0}; arglist_t exif_args[] = { - { "filename", &opt_filename, "Set waypoint name to source filename", "Y", ARGTYPE_BOOL, ARG_NOMINMAX }, - { "frame", &opt_frame, "Time-frame (in seconds)", "10", ARGTYPE_INT, "0", NULL }, - { "name", &opt_name, "Locate waypoint for tagging by this name", NULL, ARGTYPE_STRING, ARG_NOMINMAX }, - { "overwrite", &opt_overwrite, "!OVERWRITE! the original file. Default=N", "N", ARGTYPE_BOOL, ARG_NOMINMAX }, + { "filename", &opt_filename, "Set waypoint name to source filename", "Y", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, + { "frame", &opt_frame, "Time-frame (in seconds)", "10", ARGTYPE_INT, "0", NULL, nullptr }, + { "name", &opt_name, "Locate waypoint for tagging by this name", NULL, ARGTYPE_STRING, ARG_NOMINMAX, nullptr }, + { "overwrite", &opt_overwrite, "!OVERWRITE! the original file. Default=N", "N", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr }, ARG_TERMINATOR }; diff --git a/filter_skeleton.cc b/filter_skeleton.cc index 0c0f8e3d0..c05a2a877 100644 --- a/filter_skeleton.cc +++ b/filter_skeleton.cc @@ -59,7 +59,7 @@ filter_skeleton_init(const char* args) } static void -filter_skeleton_process(void) /* this procedure must be present in vecs */ +filter_skeleton_process() /* this procedure must be present in vecs */ { // Here is how you register callbacks for all waypoints, routes, tracks. // waypt_disp_all(waypt) @@ -68,7 +68,7 @@ filter_skeleton_process(void) /* this procedure must be present in vecs */ } static void -filter_skeleton_deinit(void) +filter_skeleton_deinit() { /* called after filter processing */ @@ -79,7 +79,7 @@ filter_skeleton_deinit(void) } static void -filter_skeleton_exit(void) +filter_skeleton_exit() { /* called on program exit */ diff --git a/format_skeleton.cc b/format_skeleton.cc index 4d5aa8873..3023cacec 100644 --- a/format_skeleton.cc +++ b/format_skeleton.cc @@ -63,13 +63,13 @@ format_skeleton_rd_init(const char* fname) } static void -format_skeleton_rd_deinit(void) +format_skeleton_rd_deinit() { // gbfclose(fin); } static void -format_skeleton_read(void) +format_skeleton_read() { // your special code to extract waypoint, route and track // information from gbfile "fin" @@ -110,13 +110,13 @@ format_skeleton_wr_init(const char* fname) } static void -format_skeleton_wr_deinit(void) +format_skeleton_wr_deinit() { // gbfclose(fout); } static void -format_skeleton_write(void) +format_skeleton_write() { // Here is how you register callbacks for all waypoints, routes, tracks. // waypt_disp_all(waypt) @@ -149,7 +149,10 @@ ff_vecs_t format_skeleton_vecs = { format_skeleton_write, format_skeleton_exit, format_skeleton_args, - CET_CHARSET_ASCII, 0 /* ascii is the expected character set */ + CET_CHARSET_ASCII, 0, /* ascii is the expected character set */ /* not fixed, can be changed through command line parameter */ + NULL_POS_OPS, // Unless you do realtime positioning + nullptr // name. Not used by modules. + }; /**************************************************************************/ -- 2.30.2